package com.yjc.sunnyweather.ui

import android.os.Bundle
import android.os.Handler
import com.bumptech.glide.Glide
import com.gyf.immersionbar.ImmersionBar
import com.yjc.sunnyweather.BaseActivity
import com.yjc.sunnyweather.MainActivity
import com.yjc.sunnyweather.R
import com.yjc.sunnyweather.util.CommonUtil
import kotlinx.android.synthetic.main.activity_welcome.*

class WelcomeActivity : BaseActivity() {

    private var mHandler: Handler = CommonUtil.getHandler { actionMainActivity() }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // 所有子类都将继承这些相同的属性,请在设置界面之后设置
//        ImmersionBar.with(this)
//            .fitsSystemWindows(true)
//            .statusBarDarkFont(true)
//            .navigationBarColor(R.color.white)
//            .navigationBarDarkIcon(true)
//            .init()

        setContentView(R.layout.activity_welcome)


        mHandler.sendEmptyMessageDelayed(1,1000)

        val welcomeImg = welcome_img

        //Glide.with(this).load(R.drawable.preview_logo).into(welcomeImg)

    }

    private fun actionMainActivity(){
        MainActivity.actionStart(this)
        finish()
    }


}